export function GetQueryString(name) {
	var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
	var r = window.location.search.substr(1).match(reg);
	if (r != null) return unescape(r[2]);
	return null;
}
/* 过滤空对象 */
export function clearDeep(obj) {
	if (!obj || !typeof obj === 'object') return
	const keys = Object.keys(obj)
	for (var key of keys) {
		const val = obj[key]
		if (
			typeof val === 'undefined' ||
			((typeof val === 'object' || typeof val === 'string') && !val)
		) {
			// 如属性值为null或undefined或''，则将该属性删除
			delete obj[key]
		} else if (typeof val === 'object') {
			// 属性值为对象，递归调用
			clearDeep(obj[key])

			if (Object.keys(obj[key]).length === 0) {
				// 如某属性的值为不包含任何属性的独享，则将该属性删除
				delete obj[key]
			}
		}
	}
}
export const fileUrl = 'https://upload.csetrace.top/file/'